<?php
/*
 * Created on Aug 10, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>

<?php
	$gallery_gr = $_GET['gid'];
	$i = 0;
	if($gallery_gr):
		// Using model to get more information
		$CI =& get_instance();
		$this->load->model('Model_gallery', 'model_gallery');
		$gallery_rec = $CI->model_gallery->find_by_group($gallery_gr);
	?>
	<content width="425" height="445" hcover="true" transparency="true">
	<page src="<?=public_base_url()?>images/t0.jpg" preLoad="true" caption="" place=""/>
	<?php foreach($gallery_rec as $key => $val):?>
		<?php $param = "preLoad='true'"?>
		<?php
			if(($i==0) || ($i == 3)){
				$param .= " canTear='true'";
			}
		?>
	    <page src="<?=userfile_base_url()?>gallery/big/<?=$val['img']?>" small="<?=userfile_base_url()?>gallery/big/<?=$val['small']?>" thumb="<?=userfile_base_url()?>gallery/big/<?=$val['thumb']?>" <?=$param?> caption="<?=stripslashes($val['title'])?>" place="<?=stripslashes($val['title'])?>"/>
		<?php $i++;?>
	<?php endforeach;?>
	<?php if($i%2 != 0):?>
	<page src="<?=public_base_url()?>images/album_blank.jpg" thumb="" small="" preLoad="true" caption="" place=""/>
	<?php endif;?>
	<page src="<?=public_base_url()?>images/t43.jpg" thumb="" small="" preLoad="true" caption="" place=""/>
	</content>
<?php endif;?>